package com.cby.user.controller;


import com.cby.other.R;
import com.cby.user.service.CbyIdentityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wskh
 * @since 2021-11-03
 */
@Api(tags = "身份管理")
@RestController
@RequestMapping("/user/cby_identity")
@CrossOrigin
public class CbyIdentityController {

    @Autowired
    CbyIdentityService identityService;

    @ApiOperation("获取所有身份")
    @GetMapping("/getAllRoles")
    public R getAllRoles(){
        return R.ok().data("allRoles",identityService.list());
    }

}

